home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 22 / Cream of the Crop 22.iso / bbs / fnos16a5.zip / HELP.ZIP / REWRITE < prev    next >
Text File  |  1996-05-10  |  6KB  |  219 lines

  1.  
  2. rewrite <address>
  3.  
  4.         Will show the result of the mail rewrite process, that is,
  5.         how <address> is changed based on the contents of Rewritefile
  6.         (default location is /spool/rewrite).  The result of rewriting
  7.         determines whether an incoming message is stored in an area (and,
  8.         which area receives the message), or whether it is stored into
  9.         /spool/mqueue for handling by SMTP.  The rewrite command is useful
  10.         for testing modifications to Rewritefile.
  11.  
  12.         Example:  rewrite n8fow@n8fow.ampr.org
  13.         shows the mail rewriting that will be done for mail addressed to
  14.         n8fow@n8fow.ampr.org.
  15.  
  16. REWRITE FILE
  17.         The Rewritefile is used to perform a one-to-one mapping
  18.         between a message's destination (To:) addresses as received
  19.         by JNOS, and the destination addresses as actually used by JNOS.
  20.         Each record within the rewrite file comprises a single line,
  21.         containing either two or three fields separated by spaces. The
  22.         first field is the template field; if a destination address
  23.         matches the template, it is replaced by the second field after
  24.         variable substitution.  The rewrite process terminates after the
  25.         first template match, with Jnos using the resultant value as the
  26.         new destination address, unless there is an optional third field
  27.         which contains the single letter "r".  In this case, JNOS rescans
  28.         the rewrite file from the beginning, attempting to match the new
  29.         destination address with one of the templates.  If no template
  30.         matches the destination, it is used unchanged as the result.
  31.  
  32.         If the address resulting from rewrite contains an "@" it is sent
  33.         via smtp.  Otherwise it should be the name of an area.  There is
  34.         one special case: "refuse" as the destination causes the message
  35.         to be rejected.
  36.  
  37.         A template contains a combination of verbatim ascii text, $H (which
  38.         means the hostname of the system,  and asterisks.  These asterisks
  39.         stand for a match of any number of characters (including zero).
  40.         In the second field, the character "$", followed by a single digit
  41.         in the range 1 to 9, represents the string that matched the
  42.         respective asterisk in the template.  For example,
  43.                 tcpip@* tcp
  44.                 *@tcpip tcp
  45.  
  46.         rewrites all addresses beginning or ending with "tcpip" to the
  47.         tcp area.
  48.  
  49.             
  50. SAMPLE REWRITE FILE (edit to suit your call and neighbors):
  51.  
  52. # Sample rewrite file for K5ARH pbbs, also known as w5ddl.ampr.org
  53. #
  54. # Special destinations: refuse  => send NO (ax.25) or Bad host (smtp)
  55. # (a.k.a. "areas")      nts*    => mailbox writable by all (ie, kill cmd works)
  56. #                                       Also, ST used in forwarding.
  57. #                       help    => never flag as already read, so L shows all
  58. # take x%y@me and reprocess as x@y
  59. *%*@$H $1@$2 r
  60. *%*@localhost* $1@$2 r
  61. # For dual-id'ed BBSes, treat @one as @other:
  62. *@k5arh* $1@w5ddl r
  63. #
  64. # Next, pass real FQDN's unchanged
  65. *@*.edu $1@$2.edu
  66. *@*.com $1@$2.com
  67. *@*.gov $1@$2.gov
  68. *@*.org $1@$2.org
  69. *@*.net $1@$2.net
  70. *@*.mil $1@$2.mil
  71.  
  72. #
  73. # Now addresses we discard with impunity (junk, useless stuff from gatewayed systems)
  74. #eg, astro@* refuse
  75. #eg, *@dist9 refuse
  76. dx@ww refuse
  77. #
  78.  
  79. # Handle local sysop, and sysop bulls
  80. sysop k5arh
  81. sysop@w5ddl* k5arh
  82. sysop@allla allla
  83. sysop@* sysop
  84. *@sysop sysop
  85. #
  86.  
  87. # Now pass specific bulletins on to our areas
  88. # NOTE: It is important that the lines below are kept in that order
  89. # (Ie TO sorting FIRST, then AT sorting !!)
  90. # Otherwize something like 'amsat@allusa' will end up in the 'allusa' area
  91. # instead of the 'amsat' area where I prefer it.
  92. tcpip@* tcpip
  93. wanted@* wanted
  94. want@* wanted
  95. need@* wanted
  96. wp@* btrbbs
  97. sale@* sale
  98. 4sale@* sale
  99. trade@* sale
  100. swap@* sale
  101. dx@* dx
  102. races@* races
  103. fcc@* fcc
  104. amsat@* amsat
  105. arrl@* arrl
  106. ares@* ares
  107. nasa@* nasa
  108. gulf@* gulf
  109. keps@* keps
  110. larc@* larc
  111. kd5sl@* btrbbs
  112. #
  113. *@gulf gulf
  114. *@nasa nasa
  115. *@amsat amsat
  116. *@ares* ares
  117. *@arrl arrl
  118. *@arl arrl
  119. *@la allla
  120.  
  121. *@allla allla
  122. *@allus* allus
  123. *@allbbs* allus
  124. *@us* allus
  125. *@usa allus
  126. *@franca franca
  127. *@ww ww
  128. laoep@* laoep
  129. *@laoep* laoep
  130. #
  131.  
  132. # LARC is local Lafayette distribution
  133. *@larc larc
  134. *@test test
  135. #
  136.  
  137. # Anything left @w5ddl is private mail to my users
  138. *@w5ddl* $1
  139. w5ddl@* k5arh
  140.  
  141. #
  142. # Handle local hosts I forward to:
  143. *@n5knx* n5knx
  144. *@wu3v* wu3v
  145. # Now BBSes we pass north/east/westward
  146. *@wb5bke* bkebbs
  147. *@kb5ogn* ognbbs
  148. *@ka5nmn* ognbbs
  149. *@k4ry* k4ry
  150. *@ka4pkb* ka4pkb
  151. *@w5ksi* norbbs
  152. *@kb4gbs* norbbs
  153. *@kk4cq* norbbs
  154. *@n5ssy* norbbs
  155. *@w4iax* norbbs
  156. *@n5uxt* norbbs
  157. *@wd5ghw* btrbbs
  158. *@kd5sl* btrbbs
  159. *@ae5v* aexbbs
  160. *@ke5l* aexbbs
  161. *@wg5w* aexbbs
  162. *@kb5bfv* lchbbs
  163. *@n2ktq* lchbbs
  164. *@wb5txn* lchbbs
  165. *@kb5tbb* cnbbbs
  166. *@kb5vjy* aexbbs
  167. *@wa4imz* cnbbbs
  168. *@ka5kth* cnbbbs
  169. *@wb5fro* cnbbbs
  170. *@f6cnb* cnbbbs
  171. *@w0gvt* cnbbbs
  172. ka3zyp@* cnbbbs
  173. #
  174. # Handle frequent mistakes or special cases or some other reason I now forget:
  175. 71*@* aexbbs
  176. kb5bfv lchbbs
  177. kb5bfv@* lchbbs
  178. ae5v@* aexbbs
  179. kc5gwh@* bkebbs
  180. kc5gwh bkebbs
  181. n5ssy norbbs
  182. ka5nmn@* ognbbs
  183. ka5ydj@* norbbs
  184. n5ssy@* norbbs
  185. wb5vtn@* norbbs
  186. n5eqo@* norbbs
  187. # <<<others here>>>
  188. # NTS local, in-state, outside
  189. *@705* ntslocal
  190. *@71* aexbbs
  191. *@706* lchbbs
  192. *@70* btrbbs
  193. *@ntstx* cnbbbs
  194. *@nts* nts
  195. # Now state-specific forwarding (if any)
  196. *@*.tx* cnbbbs
  197.  
  198. #
  199. # Continents via HF at west f6cnb
  200. *@*.eu cnbbbs
  201. *@*.oc cnbbbs
  202. *@*.noam cnbbbs
  203. *@*.na cnbbbs
  204. *@*.usa cnbbbs
  205. *@*.as cnbbbs
  206. *@*.af cnbbbs
  207. *@*.sa cnbbbs
  208.  
  209. #
  210. # Anything else means we must add more, above
  211. *@* check
  212.  
  213. #
  214. # Try to handle addressing mistakes by mbox users!
  215. */* check
  216. *\* check
  217. *&* check
  218. *.* check
  219.